package com.tanhua.server.controller;

import com.tanhua.domain.vo.RecommendQueryVo;
import com.tanhua.server.service.TodayBestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tanhua")
@Slf4j
public class TodayBestController {

    @Autowired
    private TodayBestService todayBestService;

    /**
     * 接口名称：今日家人
     * 接口路径：GET/tanhua/todayBest
     */
    @GetMapping("/todayBest")
    public ResponseEntity<Object> todayBest(){
        log.info("今日佳人");
        return todayBestService.queryTodayBest();
    }

    /**
     * 接口名称：推荐朋友 (首页推荐)
     * 接口路径：GET/tanhua/recommendation
     */
    @GetMapping("recommendation")
    public ResponseEntity<Object> recommendation(RecommendQueryVo vo){
        log.info("首页推荐");
        return todayBestService.queryRecommendation(vo);
    }
}
